home *** CD-ROM | disk | FTP | other *** search
- 1 'PC MAGAZINE PRINTER TEST PROGRAM
- 10 ON ERROR GOTO 690
- 20 CLS
- 30 PRINT "PRINTER SPEED BENCHMARK TEST"
- 40 PRINT:PRINT
- 50 PRINT "This program is designed to test the speed of any printer."
- 60 PRINT "It will print 50 lines of text."
- 70 PRINT
- 80 PRINT "Each line will be indented five spaces and have 65 characters."
- 90 PRINT
- 100 PRINT "At the end of this test, the number of lines, the elapsed time,"
- 110 PRINT "and the throughput in characters per second and lines per minute"
- 120 PRINT "will be printed at the bottom of the page and on the screen."
- 150 PRINT
- 180 PRINT:INPUT "Specify printer make and model";ZZ$
- 190 IF ZZ$="" THEN ZZ$="PRINTER NOT SPECIFIED"
- 200 GOSUB 520
- 210 PRINT:INPUT"Insert paper in printer and press ENTER";QQ$
- 220 W$=" This is a Test Line. It has a total of 65 characters. ZYXW{[]}%*&"
- 230 LW=LEN(W$): 'tests length of line
- 240 L=50
- 250 PRINT #1,
- 260 PRINT #1,"Printer Speed Benchmark Test: ";ZZ$: PRINT #1,
- 270 TIME$="0"
- 280 FOR I=1 TO L
- 290 PRINT #1, W$
- 300 NEXT I
- 310 T$=TIME$
- 320 M$=MID$(T$, 4,2) 'defines minutes
- 330 S$= RIGHT$(T$,2) 'defines seconds
- 340 LET M=VAL(M$) : REM minutes
- 350 LET S=VAL(S$) : REM seconds
- 360 TT=(M*60)+S: 'total time in seconds
- 370 NC=L*LW: 'total number of characters
- 380 TM=M+(S/60) 'total minutes
- 390 TP=NC/TT: 'throughput
- 400 PRINT #1,
- 420 GOTO 450
- 430 SCRN=1
- 440 CLS
- 450 PRINT #1,
- 460 IF ZZ$<>"" THEN ZZ2$="Throughput report for "
- 465 PRINT #1,"Elapsed time = ";M;"minute(s) and";S;"seconds(s) for"; L;"lines of text."
- 470 PRINT #1, ZZ2$;ZZ$":"
- 480 PRINT #1,TP;"characters per second for";NC;"characters."L/TM"lines per minute."
- 500 CLOSE #1 :OPEN "SCRN:" FOR OUTPUT AS #1:IF SCRN=1 THEN SYSTEM ELSE GOTO 430
- 510 REM
- 520 CLS
- 530 PRINT " ////// OUTPUT SELECTION MENU //////"
- 540 PRINT:PRINT
- 550 PRINT "1. First parallel printer (LPT1:)"
- 560 PRINT "2. Second parallel printer (LPT2:)"
- 570 PRINT "3. Third parallel printer (LPT3:)"
- 580 PRINT "4. First serial printer (COM1:)"
- 590 PRINT "5. Second serial printer (COM2:)"
- 591 PRINT "6. The system console (CON:)"
- 600 PRINT:PRINT
- 610 PRINT "ENTER THE APPROPRIATE NUMBER:";:O$=INPUT$(1):LOCATE,,1:PRINT O$
- 620 IF VAL(O$)=1 THEN OPEN "LPT1:" FOR OUTPUT AS #1:RETURN
- 630 IF VAL(O$)=2 THEN OPEN "LPT2:" FOR OUTPUT AS #1:RETURN
- 640 IF VAL(O$)=3 THEN OPEN "LPT3:" FOR OUTPUT AS #1:RETURN
- 650 IF VAL(O$)=4 THEN OPEN "COM1:" FOR OUTPUT AS #1:RETURN
- 660 IF VAL(O$)=5 THEN OPEN "COM2:" FOR OUTPUT AS #1:RETURN
- 670 IF VAL(O$)=6 THEN OPEN "SCRN:" FOR OUTPUT AS #1:RETURN
- 680 BEEP:GOTO 610
- 690 BEEP:PRINT "ERROR - You probably selected an incorrect device."
- 700 IF ERR=68 THEN BEEP:PRINT:PRINT "Device unavailable, please try again.": RESUME 610
- 710 ON ERROR GOTO 0
- 720 ' THIS IS THE LAST LINE OF THE PROGRAM.
- evice unavailable, please try again.": RESUME 610
- 710 ON ERROR GOTO